//
//  YDOAProChangeCell.swift
//  YDOAProduct
//
//  Created by YDWY on 2017/5/29.
//  Copyright © 2017年 Allen. All rights reserved.
//
enum YDOAProCahngeType : Int {

    case userChange = 0
    case oldNew = 1
    case branch = 2
    case all = 3
    
}





import UIKit

class YDOAProChangeCell: UITableViewCell {

    @IBOutlet weak var btn: UIButton!
    
    //点击事件返回闭包
    var callBack : ((_ type : Int,_ index : Int)->Swift.Void)? = nil
    var index : Int?
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        btn.titleLabel?.adjustsFontSizeToFitWidth = true
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    
    ///点击事件
    
    //修改使用人
    @IBAction func btnClick(_ sender: Any) {
        
        if callBack != nil {
           callBack!(0,index!)
        }
    }
    
    //修改新旧程度
    @IBAction func btn1Click(_ sender: Any) {
        if callBack != nil {
            callBack!(1,index!)
        }
    }
    
    //修改部门
    @IBAction func btn2Click(_ sender: Any) {
        if callBack != nil {
            callBack!(2,index!)
        }
    
    }
    
    //全部修改
    @IBAction func btn3Click(_ sender: Any) {
        if callBack != nil {
            callBack!(3,index!)
        }
    }
    
}
